package jzqb.dao.impl;

import cnki.tpi.kbatis.sqlsession.SqlSession;
import cnki.tpi.kbatis.utils.DataSourceUtil;
import jzqb.bo.CGBo;
import jzqb.bo.ResultBo;
import jzqb.bo.StandardBo;
import jzqb.dao.ResultDao;
import org.springframework.stereotype.Repository;
import java.util.List;

/**
 * 情报知识数据层实现类
 */
@Repository
public class ResultDaoImpl implements ResultDao {

    @Override
    public List<StandardBo> ComplexSearch(ResultBo resultBo) {
        SqlSession sqlSession = DataSourceUtil.getSqlSession();
        String statementId = "jzqb.dao.ResultDao.ComplexSearch";
        return sqlSession.selectList(statementId, resultBo, false);
    }

    @Override
    public Long findComplexSearchCount(ResultBo resultBo) {
        SqlSession sqlSession = DataSourceUtil.getSqlSession();
        String statementId = "jzqb.dao.ResultDao.findComplexSearchCount";
        return sqlSession.getCount(statementId, resultBo);
    }

    @Override
    public CGBo getResultDetail(ResultBo resultBo) {
        SqlSession sqlSession = DataSourceUtil.getSqlSession();
        String statementId = "jzqb.dao.ResultDao.getResultDetail";
        return sqlSession.selectOne(statementId, resultBo, false);
    }
}
